public class Test2 {
    int i = 10;

    //装箱,新建一个Integer类型对象，将i 的值放入对象的某个属性中
    Integer ii = Integer.valueOf(i);
    Integer ij = new Integer(i);

    //拆箱，将Integer对象中的值取出，放到一个基本数据类型中
    int j = ii.intValue();


    int a = 11;

    //自动装箱
    Integer aa = a;
    Integer ab = (Integer)a;

    //自动拆箱
    int b = aa;
    int c = (int)aa;

    public static void main(String[] args) {
        Integer a = 127;
        Integer b = 127;

        Integer c = 128;
        Integer d = 128;

        System.out.println(a == b);
        System.out.println(c == d);


    }
}
